class BookingController < ApplicationController
  
  # ==========================================
  # Filters!
  # ==========================================
  # ony logged in users can do these axions
  before_filter :authorize, :only => :destroy
  
  
  # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
  verify :method => :post, :only => [ :destroy, :create, :update ],
         :redirect_to => { :action => :list }

  # ==========================================
  # Local Variables!
  # ==========================================
  
  # ==========================================
  # Public Methods!
  # ==========================================
  
  def new
    @booking = Booking.new
  end
  
  def create
    logger.info(params)
    @booking = Booking.new(params[:booking])
    if !@booking.save
      render :action => :new
    else
      list
      render :action => :list
    end
  end
  
end
